package com.mark.migration.service.impl;

import com.mark.migration.service.ApAuthorService;
import com.mark.model.article.pojos.ApAuthor;
import com.mark.model.mappers.app.ApAuthorMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description :  作者服务
 * @Author :  Markburt
 * @CreateDate :  2020/3/5$ 下午 02:32$
 * @UpdateUser :  Markburt
 * @UpdateDate :  2020/3/5$ 下午 02:32$
 * @UpdateRemark :  Project Build
 * @Version :  1.0
 */
@Service
@SuppressWarnings("all")
public class ApAuthorServiceImpl implements ApAuthorService {

    @Autowired
    private ApAuthorMapper apAuthorMapper;
    /**
     *按ID查询
     * @param ids
     * @return
     */
    @Override
    public List<ApAuthor> queryByIds(List<Integer> ids) {
        return apAuthorMapper.selectByIds(ids);
    }


    /****
     *按ID获取
     * @param id
     * @return
     */
    @Override
    public ApAuthor getById(Long id) {
        if ( null !=id){
            return apAuthorMapper.selectById(id.intValue());
        }
        return null;
    }
}
